Method for detecting field navigation line after ridge sealing of crops

ABSTRACT

A method for detecting a field navigation line after ridge sealing of crops includes the following steps. A field crop image is acquired. Image color space transformation, image binaryzation, longitudinal integration, neighborhood setting and region integration calculation are sequentially performed on the field crop image to obtain a crop row image. Detections of an initial middle ridge, a left ridge and a right ridge are performed on the crop row image to obtain center lines of the initial middle ridge, left ridge and right ridge. Center lines of a left (right) crop row are established by using an area 1 between the center lines of the left (right) ridge and the initial middle ridge. A center line model of a middle ridge is established by using an area 0 between the center lines of the left and right crop rows, namely a navigation line of a field operation machine.

TECHNOLOGY FIELD

The invention relates to a method for automatic field navigation ofagricultural machinery, and particularly to a method for detecting afield navigation line after a ridge sealing of crops.

BACKGROUND

The automatic operation of intelligent agricultural machinery in thefield requires navigation control. As a general navigation technology,the satellite positioning system is applicable to the situation where awalking path is determined. However, in a field, due to factors such aschanges in crop types and crop growth conditions, it is difficult tomaintain a stable advance path in the field, and it needs to be adjustedaccording to the actual situation. Therefore, it is particularlyimportant to identify field crops and provide navigation information forintelligent operating machines.

To implement the acquisition of field navigation information, scholarshave carried out a lot of research.

Hough transform method: Jiang et al. (2016) used the over-green 2G-R-Bfeature combined with the Otsu threshold segmentation method and themoving window method to extract feature points of candidate crop rows.For the candidate straight lines extracted by Hough transform method,after processing based on a vanishing point and K-means clusteringmethod, the real crop rows are obtained (Jiang G, Wang X, Wang Z, et al.wheat rows detection at the early growth stage based on Hough transformand vanishing point[J]. Computers & Electronics in Agriculture, 2016,123:211-223).

Template matching method: Hague et al. (2001) matched wheat rows with abandpass filter, which can effectively solve the image shadow problem.One function of the bandpass filter is to block some high-frequencysignals to attenuate the effect of spurious features such as weeds andinternal structural details of crop rows, and the second function is toblock some low-frequency signals to suppress the effect of lightchanges. However, the adaptability of the method to different naturalconditions needs to be further improved. (Hague T, Tillett ND. Abandpass filter-based approach to crop row location and tracking[J].Mechatronics, 2001, 11(1):1-12). Zhang Fangming (2006) proposed analgorithm for locating crop rows by a trapezoidal model. Based on thegrayscale features of the line scan lines of the image, a grayscalecurve model representing crop characteristics was constructed, and thewavelet analysis method was used to extract the trend curve. Fastalgorithms for target features from rough positioning to precisepositioning are constructed. This rough-to-precise strategy based onwavelet decomposition can ensure the real-time performance of imageprocessing algorithms, reliable detection, and fast calculation speed.However, when the vehicle deviates from the road greatly, if a certainrow moves out of the field of view, a matching failure may occuraccordingly. (Zhang Fangming. Research on field path recognitionalgorithm and vehicle autonomous navigation method based on stereovision [D]. Zhejiang University, 2006).

Linear regression method: Montalvo et al. (2012) proposed the “Otsu andlinear regression (OLR) method”, i.e., crop rows are detected by leastsquares method (Montalvo M, Pajares G, Guerrero J M, et al. Automaticdetection of crop rows in maize fields with high weeds pressure[J].Expert Systems with Applications, An International Journal, 2012,39(15):11889-11897). García-Santillán et al. (2017) proposed thedetection based on micro-ROIs (DBMR) method, and based on multipleregions of interest, the Hough transform and the least squares methodare combined. The Hough transform is used to locate the starting pointof each crop row, then the ROI is divided into multiple horizontal bars,the candidate points are extracted each time by using the micro-ROI, andfinally the least squares method is used to fit the crop row straightline (García-Santillán, Iván D, Montalvo, Martín, Guerrero, José M, etal. Automatic detection of curved and straight crop rows from images inmaize fields[J]. Biosystems Engineering, 2017, 156:61-79).

The foregoing methods mostly extract navigation information based on thelarger spacing among crops. However, in the late stage of growth ofcrops such as corns, cotton, and sugarcanes, the branches and leaves oftwo adjacent rows of the crops are overlapped with each other, that is,the rows of crops are closed (closed rows or closed ridges), and thesemethods are no longer applicable.

SUMMARY

To meet the requirements and solve the problems in the technology of therelated art, the invention proposes a method for extracting navigationinformation by using regional integral difference, so as to implementthe detection between the rows of closed crops.

The technical scheme of the invention is as follows.

The method includes the following steps:

1) Crop image acquisition: a camera is used to acquire a field cropimage, recorded as an original image S1.

The optical axis of the camera takes pictures in the direction of thefield ridge.

2) Image color space transformation: the original image S1 is convertedto HSI color space to obtain an HSI image S2.

3) Image binarization: the pixel value of the pixel whose hue componentvalue H is between 0.2 and 0.583 in the HSI image S2 is set to be 1, andthe pixel values of the remaining pixels are set to be 0 to obtain abinary image S3.

4) Longitudinal integration: the binary image S3 is duplicated as alongitudinal integral image S4, and each column on the longitudinalintegral image S4 is traversed. In each column, each pixel is traverseddownward from the pixel of the second row. When traversing, the pixelvalues of the pixels of the previous row are added, and the result iscovered with the pixel value of the current pixel, so as to obtain thelongitudinal integral image S4.

5) Neighborhood setting: the neighborhood of the current pixel is set,and the neighborhood is 1/48 of the image width of the original imageS1. A 3-row two-dimensional matrix R is used to represent theneighborhood, and a column in the two-dimensional matrix R represents acolumn in the neighborhood. Each element of the first row in thetwo-dimensional matrix R represents the column offset of each column inthe neighborhood relative to the current pixel, each element of thesecond row represents the abscissa offset of the start row of eachcolumn in the neighborhood, and each element of the third row representsthe abscissa offset of the end row of each column in the neighborhood.

6) Region integration calculation: a blank image having a size the sameas that of the longitudinal integral image S4 is constructed as a regionintegration image S5, and each pixel is traversed on the longitudinalintegral image S4, which is processed in the way as follows. Whentraversing, the current pixel coordinates are marked as (x, y), anaccumulator C is set, and the initial value of the accumulator C is setto be 0. When traversing each column of the two-dimensional matrix R andtraversing the two-dimensional matrix R, the elements of the first rowto the third row of the current j-th column are R_(1j), R_(2j), andR_(3j), the difference is obtained by subtracting the pixel value of thepixel with coordinates (x+R_(3j)−1, y+R_(1j)) from the pixel value ofthe pixel with coordinates (x+R_(3j), y+R_(1j)) on the longitudinalintegral image S4, and the difference is accumulated into theaccumulator C. After traversing the two-dimensional matrix R iscompleted, the value in the accumulator C is taken as the regionalintegral value M of the current pixel, and the regional integral value Mis assigned to the pixel having coordinates the same as those of thecurrent pixel in the region integration image S5.

7) Detections of crop rows: each row is traversed in the regionintegration image S5, the average value of the regional integral value Mof all pixels in each row is calculated, the pixel whose regionalintegral value M is greater than the average value is set to be 1, theremaining pixels are set to be 0, and a crop row image S6 is obtained.

8) Detections of the initial middle ridge, the left ridge, and the rightridge:

8.1) The crop row image S6 is divided into N crop row sub-images S7having a width the same as the width of the crop row image S6 and aheight 1/N of the height of the crop row image S6.

8.2) The i-th crop row sub-image S7 is taken, and a longitudinalprojection vector S8 of the i-th crop row sub-image S7 is calculated.

8.3) Detection of the left boundary of the initial middle ridge: aninitial middle ridge start detection template ML0 is constructed, andthe initial middle ridge start detection template ML0 is a vector whoselength is ⅙ of the width of the original image S1, the first half is 1,and the second half is −1. The longitudinal projection vector S8 isconvolved with the initial middle ridge start detection template ML0,and the column number of the position of the point with the maximumconvolution value is taken as an initial middle ridge left boundaryp0L0_(i) of the i-th crop row sub-image S7.

8.4) Detection of the right boundary of the initial middle ridge: aninitial middle ridge termination detection template MR0 is constructed,and the initial middle ridge termination detection template MR0 is avector whose length is ⅙ of the width of the original image S1, thefirst half is −1, and the second half is 1. The longitudinal projectionvector S8 is convolved with the initial middle ridge terminationdetection template MR0, and the column number of the position of thepoint with the maximum convolution value is taken as an initial middleridge right boundary p0R0_(i) of the i-th crop row sub-image S7.

8.5) An initial middle ridge center p0M0_(i) of the i-th crop rowsub-image S7 is calculated by the following formula:p0M0_(i)=(p0L0_(i)+p0R0_(i))/2.

8.6) Detection of the left boundary of the initial left row: an initialleft row start detection template MR1 is constructed, and the initialleft row start detection template MR1 is a vector whose length is ½ ofthe length of the initial middle ridge termination detection templateMR0, the first half is −1, and the second half is 1. The initial leftrow start detection template MR1 is used to be convolved with the dataof the longitudinal projection vector S8 on the left side of the initialmiddle ridge left boundary p0L0_(i). The column number of the positionof the point with the maximum convolution value is taken as an initialleft row left boundary CL0_(i) of the i-th crop row sub-image S7.

8.7) Detection of the right boundary of the initial right row: aninitial right row termination detection template ML1 is constructed, andthe initial right row termination detection template ML1 is a vectorwhose length is ½ of the length of the initial middle ridge startdetection template ML0, the first half is 1, and the second half is −1.The initial right row termination detection template ML1 is used to beconvolved with the data of the longitudinal projection vector S8 on theright side of the initial middle ridge right boundary p0R0_(i). Thecolumn number of the position of the point with the maximum convolutionvalue is taken as an initial right row right boundary CR0_(i) of thei-th crop row sub-image S7.

8.8) Estimation of the center point of the left ridge: an initial leftrow horizontal center column CLM0_(i) of the i-th crop row sub-image S7is calculated by the following formula: CLM0_(i)=(CL0_(i)+p0L0_(i))/2.Then, a column pLM0_(i) where the center point of the left ridge of thei-th crop row sub-image S7 is located is calculated by the followingformula: pLM0_(i)=2×CLM0_(i)−p0M0_(i).

8.9) Estimation of the center point of the right ridge: an initial rightrow horizontal center column CRM0_(i) of the i-th crop row sub-image S7is calculated by the following formula: CRM0_(i)=(CR0_(i)+p0R0_(i))/2.Then, a column pRM0_(i) where the center point of the right ridge of thei-th crop row sub-image S7 is located is calculated by the followingformula: pRM0_(i)=2×CRM0_(i)−p0M0_(i).

8.10) Calculation of the ordinate of the crop row sub-image S7: theordinate of the position of the center point of the crop row sub-imageS7 on the crop row image S6 is taken as an ordinate S7 y _(i) of thecrop row sub-image S7.

8.11) Determining the center lines of the initial middle ridge, the leftridge, and the right ridge.

Step 8.2) to step 8.11) are repeated, the N crop row sub-images S7 ofthe crop row image S6 are sequentially traversed. Each crop rowsub-image S7 obtains an initial middle ridge center p0M0_(i), an initialleft row horizontal center column CLM0_(i), an initial right rowhorizontal center column CRM0_(i), and an ordinate S7 y _(i) of the croprow sub-image S7, and therefore the results of all N crop row sub-imagesS7 are composed to obtain a set of an initial middle ridge center setp0M0, an initial left row horizontal center column set CLM0, an initialright row horizontal center column set CRM0, and an ordinate set S7 y ofthe crop row sub-image S7.

The ordinate S7 y _(i) of the crop row sub-image S7 serves as anindependent variable, the initial middle ridge center p0M0_(i), theinitial left row horizontal center column CLM0_(i), and the initialright row horizontal center column CRM0_(i) serve as dependentvariables, respectively, and the univariate regression models pM, pL andpR are constructed between the initial middle ridge center p0M0_(i) andthe ordinate S7 y _(i) of the crop row sub-image S7, between the initialleft row horizontal center column CLM0_(i) and the ordinate S7 y _(i) ofthe crop row sub-image S7, and between the initial right row horizontalcenter column CRM0_(i) and the ordinate S7 y _(i) of the crop rowsub-image S7, respectively. The univariate regression models pM, pL, andpR are actually a fitted straight line.

9) Detections of the left crop row and the right crop row:

9.1) A blank right crop row point set SCR and a blank left crop rowpoint set SCL are constructed.

9.2) The k-th row is taken on the crop row image S6 as a row image S9,the ordinate of the row image S9 as an independent variable issubstituted into the univariate regression models pM, pL, and pR toobtain a crop middle ridge center column p0M1_(k), a crop left ridgehorizontal center column CLM1_(k), and a crop left ridge horizontalcenter column CRM1_(k) on the current row image S9.

9.3) The blank left crop row point set SCL is constructed. On thecurrent row image S9, the coordinates of the pixel with a pixel value of1 between the crop middle ridge center column p0M1_(k) and the crop leftridge horizontal center column CLM1_(k) corresponding to the crop rowimage S6 is added to the left crop row point set SCL.

9.4) The blank right crop row point set SCR is constructed. On thecurrent row image S9, the coordinates of the pixel with a pixel value of1 between the crop middle ridge center column p0M1_(k) and the crop leftridge horizontal center column CRM1_(k) corresponding to the crop rowimage S6 is added to the right crop row point set SCR.

9.5) Step 9.2) to step 9.4) are repeated. Each row of the crop row imageS6 is traversed to obtain the complete left crop row point set SCL andthe right crop row point set SCR.

9.6) The ordinates of the pixels in the left crop row point set SCLserve as independent variables, the abscissas of the pixels in the leftcrop row point set SCL serve as dependent variables, and a univariateregression model for the left crop row point set SCL is constructed, anda left crop row centerline model CL is obtained.

9.7) The ordinates of the pixels in the right crop row point set SCRserve as independent variables, the abscissas of the pixels in the rightcrop row point set SCR serve as dependent variables, and a univariateregression model for the right crop row point set SCR is constructed,and a right crop row centerline model CR is obtained.

The left crop row centerline model CL and the right crop row centerlinemodel CR are actually a fitted straight line.

10) Detection of the middle ridge:

10.1) A blank middle ridge point set Spath is constructed.

10.2) The q-th row on the crop row image S6 is taken as a row image S10,and the ordinate of the line image S10 as an independent variable issubstituted into the left crop row centerline model CL and the rightcrop row centerline model CR to obtain a left row center point CL1_(q)and a right row center point CR1_(q) on the current line image S10.

10.3) On the current line image S10, the coordinates of the pixel with apixel value of 0 between the left row center point CL1_(q) and the rightrow center point CR1_(q) corresponding to the crop row image S6 is addedinto the middle ridge point set SPath.

10.4) Step 10.2) to step 10.3) are repeated. Each row image S10 of thecrop row image S6 is traversed to obtain the complete middle ridge pointset Spath.

10.5) The ordinates of the pixels in the middle ridge point set SPathserve as independent variables, and the abscissas of the pixels in themiddle ridge point set SPath serve as dependent variables. A univariateregression model is constructed for the middle ridge point set SPath,and a middle ridge centerline model pPath is obtained. The straight linewhere the middle ridge centerline model pPath is located is thenavigation line for the field machinery.

Beneficial Effects of the Invention

The invention utilizes the difference of crop region integration toobtain an initial crop row. By constructing a regression model, aninitial ridge is determined to be left and right crop rows, and then theleft and right crop rows are used to construct the middle ridgecenterline model, which overcomes the defect of which the previousmethods cannot be applied to the extraction of navigation information ofclosed crops, implements the acquisition of navigation informationbetween closed crop rows, and improves the adaptability of fieldmachinery.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is a schematic view of an original image S1 of an embodiment.

FIG. 2 is a schematic view of an HSI image S2 of an embodiment.

FIG. 3 is a schematic view of a binary image S3 of an embodiment.

FIG. 4 is a schematic view of a longitudinal integral image S4 of theembodiment.

FIG. 5 is a schematic view of a neighborhood of an embodiment.

FIG. 6 is a schematic view of a crop row image S6 of the embodiment.

FIG. 7 is a schematic view of an initial middle ridge start detectiontemplate ML of an embodiment.

FIG. 8 is a schematic view of an initial middle ridge terminationdetection template MR of an embodiment.

FIG. 9 is a schematic view of a left ridge centerline, an initial middleridge centerline, and a right ridge centerline of the embodiment.

FIG. 10 is a schematic view of a left crop row centerline, a middle rowcenterline, and a right crop row centerline of the embodiment.

DESCRIPTION OF THE EMBODIMENTS

The invention is further illustrated with reference to the accompanyingdrawings and embodiments in the subsequent paragraphs.

The invention includes steps as follows.

1) Crop image acquisition: a camera is used to acquire a field cropimage, recorded as an original image S1, as shown in FIG. 1 .

The optical axis of the camera takes pictures in the direction of thefield ridge.

2) Image color space transformation: the original image S1 is convertedto HSI color space to obtain an HSI image S2, as shown in FIG. 2 .

3) Image binarization: the pixel value of the pixel whose hue componentvalue H is between 0.2 and 0.583 in the HSI image S2 is set to be 1, andthe pixel values of the remaining pixels are set to be 0 to obtain abinary image S3, as shown in FIG. 3 .

4) Longitudinal integration:

The binary image S3 is duplicated as a longitudinal integral image S4,and each column on the longitudinal integral image S4 is traversed. Ineach column, each pixel is traversed downward from the pixel of thesecond row. When traversing, the pixel values of the pixels of theprevious row are added, and the result is covered with the pixel valueof the current pixel, so as to obtain the longitudinal integral imageS4, as shown in FIG. 4 .

5) Neighborhood setting:

The neighborhood of the current pixel is set, and the neighborhood is1/48 of the image width of the original image S1, as shown in FIG. 5 . A3-row two-dimensional matrix R is used to represent the neighborhood,and a column in the two-dimensional matrix R represents a column in theneighborhood. Each element of the first row in the two-dimensionalmatrix R represents the column offset of each column in the neighborhoodrelative to the current pixel, each element of the second row representsthe abscissa offset of the start row of each column in the neighborhood,and each element of the third row represents the abscissa offset of theend row of each column in the neighborhood.

6) Region integration calculation:

A blank image having a size the same as that of the longitudinalintegral image S4 is constructed as a region integration image S5, andeach pixel is traversed on the longitudinal integral image S4, which isprocessed in the way as follows. When traversing, the current pixelcoordinates are marked as (x, y), an accumulator C is set, and theinitial value of the accumulator C is set to be 0. When traversing eachcolumn of the two-dimensional matrix R and traversing thetwo-dimensional matrix R, the elements of the first row to the third rowof the current j-th column are R_(1j), R_(2j), and R_(3j), thedifference is obtained by subtracting the pixel value of the pixel withcoordinates (x+R_(3j)−1, y+R_(1j)) from the pixel value of the pixelwith coordinates (x+R_(3j), y+R_(1j)) on the longitudinal integral imageS4, and the difference is accumulated into the accumulator C. Aftertraversing the two-dimensional matrix R is completed, the value in theaccumulator C is taken as the regional integral value M of the currentpixel, and the regional integral value M is assigned to the pixel havingcoordinates the same as those of the current pixel in the regionintegration image S5.

After traversing each pixel of the longitudinal integral image S4 iscompleted, the region integration image S5 is obtained, as shown in FIG.5 .

7) Detections of crop rows: Each row is traversed in the regionintegration image S5, the average value of the regional integral value Mof all pixels in each row is calculated, the pixel whose regionalintegral value M is greater than the average value is set to be 1, theremaining pixels are set to be 0, and a crop row image S6 is obtained,as shown in FIG. 6 .

8) Detections of the initial middle ridge, the left ridge, and the rightridge Step 8) is as follows specifically.

8.1) The crop row image S6 is divided into N crop row sub-images S7having a width the same as the width of the crop row image S6 and aheight 1/N of the height of the crop row image S6.

8.2) The i-th crop row sub-image S7 is taken, and a longitudinalprojection vector S8 of the i-th crop row sub-image S7 is calculated.

8.3) Detection of the left boundary of the initial middle ridge: aninitial middle ridge start detection template ML0 is constructed, andthe initial middle ridge start detection template ML0 is a vector whoselength is ⅙ of the width of the original image S1, the first half is 1,and the second half is −1, as shown in FIG. 7 . The longitudinalprojection vector S8 is convolved with the initial middle ridge startdetection template ML0, and the column number of the position of thepoint with the maximum convolution value is taken as an initial middleridge left boundary p0L0_(i) of the i-th crop row sub-image S7.

8.4) Detection of the right boundary of the initial middle ridge: aninitial middle ridge termination detection template MR0 is constructed,and the initial middle ridge termination detection template MR0 is avector whose length is ⅙ of the width of the original image S1, thefirst half is −1, and the second half is 1, as shown in FIG. 8 . Thelongitudinal projection vector S8 is convolved with the initial middleridge termination detection template MR0, and the column number of theposition of the point with the maximum convolution value is taken as aninitial middle ridge right boundary p0R0_(i) of the i-th crop rowsub-image S7.

8.5) An initial middle ridge center p0M0_(i) of the i-th crop rowsub-image S7 is calculated by the following formula:p0M0_(i)=(p0L0_(i)+p0R0_(i))/2.

8.6) Detection of the left boundary of the initial left row: an initialleft row start detection template MR1 is constructed, and the initialleft row start detection template MR1 is a vector whose length is ½ ofthe length of the initial middle ridge termination detection templateMR0, the first half is −1, and the second half is 1. The initial leftrow start detection template MR1 is used to be convolved with the dataof the longitudinal projection vector S8 on the left side of the initialmiddle ridge left boundary p0L0_(i). The column number of the positionof the point with the maximum convolution value is taken as an initialleft row left boundary CL0_(i) of the i-th crop row sub-image S7.

8.7) Detection of the right boundary of the initial right row: aninitial right row termination detection template ML1 is constructed, andthe initial right row termination detection template ML1 is a vectorwhose length is ½ of the length of the initial middle ridge startdetection template ML0, the first half is 1, and the second half is −1.The initial right row termination detection template ML1 is used to beconvolved with the data of the longitudinal projection vector S8 on theright side of the initial middle ridge right boundary p0R0_(i). Thecolumn number of the position of the point with the maximum convolutionvalue is taken as an initial right row right boundary CR0_(i) of thei-th crop row sub-image S7.

8.8) Estimation of the center point of the left ridge: an initial leftrow horizontal center column CLM0_(i) of the i-th crop row sub-image S7is calculated by the following formula: CLM0_(i)=(CL0_(i)+p0L0_(i))/2.Then, a column pLM0_(i) where the center point of the left ridge of thei-th crop row sub-image S7 is located is calculated by the followingformula: pLM0_(i)=2×CLM0_(i)−p0M0_(i).

8.9) Estimation of the center point of the right ridge: an initial rightrow horizontal center column CRM0_(i) of the i-th crop row sub-image S7is calculated by the following formula: CRM0_(i)=(CR0_(i)+p0R0_(i))/2.Then, a column pRM0_(i) where the center point of the right ridge of thei-th crop row sub-image S7 is located is calculated by the followingformula: pRM0_(i)=2×CRM0_(i)−p0M0_(i).

8.10) Calculation of the ordinate of the crop row sub-image S7: Theordinate of the position of the center point of the crop row sub-imageS7 on the crop row image S6 is taken as an ordinate S7 y _(i) of thecrop row sub-image S7.

8.11) Determining the center lines of the initial middle ridge, the leftridge, and the right ridge.

Step 8.2) to step 8.11) are repeated, the N crop row sub-images S7 ofthe crop row image S6 are sequentially traversed. Each crop rowsub-image S7 obtains an initial middle ridge center p0M0_(i), an initialleft row horizontal center column CLM0_(i), an initial right rowhorizontal center column CRM0_(i), and an ordinate S7 y _(i) of the croprow sub-image S7, and therefore the results of all N crop row sub-imagesS7 are composed to obtain a set of an initial middle ridge center setp0M0, an initial left row horizontal center column set CLM0, an initialright row horizontal center column set CRM0, and an ordinate set S7 y ofthe crop row sub-image S7.

As shown in FIG. 9 , the ordinate S7 y _(i) of the crop row sub-image S7serves as an independent variable, the initial middle ridge centerp0M0_(i), the initial left row horizontal center column CLM0_(i), andthe initial right row horizontal center column CRM0_(i) serve asdependent variables, respectively, and the univariate regression modelspM, pL and pR are constructed between the initial middle ridge centerp0M0_(i) and the ordinate S7 y _(i) of the crop row sub-image S7,between the initial left row horizontal center column CLM0_(i) and theordinate S7 y _(i) of the crop row sub-image S7, and between the initialright row horizontal center column CRM0_(i) and the ordinate S7 y _(i)of the crop row sub-image S7, respectively. The univariate regressionmodels pM, pL, and pR are actually a fitted straight line.

As shown in FIG. 9 , the three straight lines from right to right in thedrawing are pM, pL, and pR, respectively.

9) Detections of the left crop row and the right crop row:

The implementation is as follows.

9.1) A blank right crop row point set SCR and a blank left crop rowpoint set SCL are constructed.

9.2) The k-th row is taken on the crop row image S6 as a row image S9,the ordinate of the row image S9 as an independent variable issubstituted into the univariate regression model pM, pL, and pR toobtain a crop middle ridge center column p0M1_(k), a crop left ridgehorizontal center column CLM1_(k), and a crop left ridge horizontalcenter column CRM1_(k) on the current row image S9.

9.3) The blank left crop row point set SCL is constructed. On thecurrent row image S9, the coordinates of the pixel with a pixel value of1 between the crop middle ridge center column p0M1_(k) and the crop leftridge horizontal center column CLM1_(k) corresponding to the crop rowimage S6 is added to the left crop row point set SCL.

9.4) The blank right crop row point set SCR is constructed. On thecurrent row image S9, the coordinates of the pixel with a pixel value of1 between the crop middle ridge center column p0M1_(k) and the crop leftridge horizontal center column CRM1_(k) corresponding to the crop rowimage S6 is added to the right crop row point set SCR.

9.5) Step 9.2) to step 9.4) are repeated. Each row of the crop row imageS6 is traversed to obtain the complete left crop row point set SCL andthe right crop row point set SCR.

9.6) The ordinates of the pixels in the left crop row point set SCLserve as independent variables, the abscissas serve as dependentvariables, a univariate regression model for the left crop row point setSCL is constructed, and a left crop row centerline model CL is obtained.

9.7) The ordinates of the pixels in the right crop row point set SCRserve as independent variables, the abscissas serve as dependentvariables, a univariate regression model for the right crop row pointset SCR is constructed, and a right crop row centerline model CR isobtained.

The left crop row centerline model CL and the right crop row centerlinemodel CR are actually a fitted straight line.

10) Detection of the middle ridge:

The implementation is as follows.

10.1) A blank middle ridge point set Spath is constructed.

10.2) The q-th row on the crop row image S6 is taken as a row image S10,and the ordinate of the line image S10 as an independent variable issubstituted into the left crop row centerline model CL and the rightcrop row centerline model CR to obtain a left row center point CL1_(q)and a right row center point CR1_(q) on the current line image S10.

10.3) On the current line image S10, the pixel with a pixel value of 0between the left row center point CL1_(q) and the right row center pointCR1_(q) corresponding to the coordinates of the crop row image S6 isadded into the middle ridge point set SPath.

10.4) Step 10.2) to step 10.3) are repeated. Each row image S10 of thecrop row image S6 is traversed to obtain the complete middle ridge pointset Spath.

10.5) The ordinates of the pixels in the middle ridge point set SPathserve as independent variables, the abscissas serve as dependentvariables, a univariate regression model is constructed for the middleridge point set SPath, and a middle ridge centerline model pPath isobtained. The straight line where the middle ridge centerline modelpPath is located is the navigation line for the field machinery. Asshown in FIG. 10 , the three straight lines from right to right in thedrawing are the left crop row centerline model CL, the middle ridgecenterline model pPath, and the right crop row centerline model CR,respectively.

1. A method for detecting a field navigation line after a ridge sealingof crops, characterized in that the method comprises steps asfollows: 1) performing crop image acquisition, wherein a camera is usedto acquire a field crop image, recorded as an original image S1; 2)performing image color space transformation, wherein the original imageS1 is converted to HSI color space to obtain an HSI image S2; 3)performing image binarization to obtain a binary image S3; 4) processinglongitudinal integration of the binary image S3 to obtain a longitudinalintegral image S4; 5) performing neighborhood setting, wherein aneighborhood of a current pixel is set, the neighborhood is 1/48 of animage width of the original image S1, a 3-row two-dimensional matrix Ris used to represent the neighborhood, a column in the two-dimensionalmatrix R represents a column in the neighborhood, each element of afirst row in the two-dimensional matrix R represents a column offset ofeach column in the neighborhood relative to the current pixel, eachelement of a second row represents an abscissa offset of a start row ofeach column in the neighborhood, and each element of a third rowrepresents an abscissa offset of an end row of each column in theneighborhood; 6) performing region integration calculation, wherein ablank image having a size the same as that of the longitudinal integralimage S4 is constructed as a region integration image S5, and each pixelis traversed on the longitudinal integral image S4, which is processedin the way as follows: when traversing, current pixel coordinates aremarked as (x, y), an accumulator C is set, and an initial value of theaccumulator C is set to be 0; when traversing each column of thetwo-dimensional matrix R and traversing the two-dimensional matrix R,elements of the first row to the third row of a current j-th column areR_(1j), R_(2j), and R_(3j), a difference is obtained by subtracting apixel value of a pixel with coordinates (x+R_(3j)−1, y+R_(1j)) from apixel value of a pixel with coordinates (x+R_(3j), y+R_(1j)) on thelongitudinal integral image S4, the difference is accumulated into theaccumulator C, after traversing the two-dimensional matrix R iscompleted, a value in the accumulator C is taken as a regional integralvalue M of the current pixel, the regional integral value M is assignedto the pixel having coordinates the same as those of the current pixelin the region integration image S5, and after traversing each pixel ofthe longitudinal integral image S4 is completed, the region integrationimage S5 is obtained; 7) performing detections of crop rows, whereineach row is traversed in the region integration image S5, an averagevalue of the regional integral value M of all pixels in each row iscalculated, a pixel whose regional integral value M is greater than theaverage value is set to be 1, the remaining pixels are set to be 0, anda crop row image S6 is obtained; 8) performing detections of an initialmiddle ridge, a left ridge, and a right ridge; 9) performing detectionsof left crop row and right crop row; 10) performing detection of amiddle ridge.
 2. The method for detecting the field navigation lineafter the ridge sealing of the crops according to claim 1, wherein thestep 3) specifically comprises: setting a pixel value of the pixel whosehue component value H is between 0.2 and 0.583 in the HSI image S2 to 1,and setting a pixel value of remaining pixels to 0 to obtain the binaryimage S3.
 3. The method for detecting the field navigation line afterthe ridge sealing of the crops according to claim 1, wherein the step 4)specifically comprises: duplicating the binary image S3 as thelongitudinal integral image S4; traversing each column on thelongitudinal integral image S4; in each column, traversing each pixeldownward from a pixel of the second row; when traversing, pixel valuesof pixels of the previous row are added; and covering a result with apixel value of the current pixel, so as to obtain the longitudinalintegral image S4.
 4. The method for detecting the field navigation lineafter the ridge sealing of the crops according to claim 1, wherein thestep 8) specifically comprises: 8.1) dividing the crop row image S6 intoN crop row sub-images S7 having a width the same as a width of the croprow image S6 and a height 1/N of a height of the crop row image S6; 8.2)taking an i-th crop row sub-image S7, and calculating a longitudinalprojection vector S8 of the i-th crop row sub-image S7; 8.3) performingdetection of the left boundary of the initial middle ridge, wherein aninitial middle ridge start detection template ML0 is constructed, theinitial middle ridge start detection template ML0 is a vector whoselength is ⅙ of a width of the original image S1, a first half is 1, asecond half is −1, the longitudinal projection vector S8 is convolvedwith the initial middle ridge start detection template ML0, and a columnnumber of a position of a point with a maximum convolution value istaken as an initial middle ridge left boundary p0L0_(i) of the i-th croprow sub-image S7; 8.4) performing detection of a right boundary of theinitial middle ridge, wherein an initial middle ridge terminationdetection template MR0 is constructed, the initial middle ridgetermination detection template MR0 is a vector whose length is ⅙ of thewidth of the original image S1, a first half is −1, a second half is 1,the longitudinal projection vector S8 is convolved with the initialmiddle ridge termination detection template MR0, and a column number ofa position of a point with a maximum convolution value is taken as aninitial middle ridge right boundary p0R0_(i) of the i-th crop rowsub-image S7; 8.5) calculating an initial middle ridge center p0M0_(i)of the i-th crop row sub-image S7 by a formula as follows:p0M0_(i)=(p0L0_(i)+p0R0_(i))/2; 8.6) performing detection of a leftboundary of an initial left row, wherein an initial left row startdetection template MR1 is constructed, the initial left row startdetection template MR1 is a vector whose length is ½ of a length of theinitial middle ridge termination detection template MR0, a first half is−1, a second half is 1, the initial left row start detection templateMR1 is used to be convolved with data of the longitudinal projectionvector S8 on the left side of the initial middle ridge left boundaryp0L0_(i), and a column number of a position of a point with the maximumconvolution value is taken as an initial left row left boundary CL0_(i)of the i-th crop row sub-image S7; 8.7) performing detection of a rightboundary of an initial right row, wherein an initial right rowtermination detection template ML1 is constructed, wherein the initialright row termination detection template ML1 is a vector whose length is½ of a length of the initial middle ridge start detection template ML0,a first half is 1, a second half is −1, the initial right rowtermination detection template ML1 is used to be convolved with data ofthe longitudinal projection vector S8 on the right side of the initialmiddle ridge right boundary p0R0_(i), and a column number of a positionof a point with the maximum convolution value is taken as an initialright row right boundary CR0_(i) of the i-th crop row sub-image S7; 8.8)performing estimation of a center point of the left ridge, wherein aninitial left row horizontal center column CLM0_(i) of the i-th crop rowsub-image S7 is calculated by the following formula:CLM0_(i)=(CL0_(i)+p0L0_(i))/2, and then a column pLM0_(i) where thecenter point of the left ridge of the i-th crop row sub-image S7 islocated is calculated by the following formula:pLM0_(i)=2×CLM0_(i)−p0M0_(i); 8.9) performing estimation of a centerpoint of the right ridge, wherein an initial right row horizontal centercolumn CRM0_(i) of the i-th crop row sub-image S7 is calculated by thefollowing formula: CRM0_(i)=(CR0_(i)+p0R0_(i))/2, and then a columnpRM0_(i) where the center point of the right ridge of the i-th crop rowsub-image S7 is located is calculated by the following formula:pRM0_(i)=2×CRM0_(i)−p0M0_(i); 8.10) performing calculation of anordinate of the crop row sub-image S7, wherein an ordinate of a positionof a center point of the crop row sub-image S7 on the crop row image S6is taken as an ordinate S7 y _(i) of the crop row sub-image S7; 8.11)determining center lines of the initial middle ridge, the left ridge,and the right ridge, wherein step 8.2) to step 8.11) are repeated, the Ncrop row sub-images S7 of the crop row image S6 are sequentiallytraversed, each crop row sub-image S7 obtains an initial middle ridgecenter p0M0_(i), an initial left row horizontal center column CLM0_(i)an initial right row horizontal center column CRM0_(i), and the ordinateS7 y _(i) of the crop row sub-image S7, and therefore results of all Ncrop row sub-images S7 are composed to obtain a set of an initial middleridge center set p0M0, an initial left row horizontal center column setCLM0, an initial right row horizontal center column set CRM0, and anordinate set S7 y of the crop row sub-image S7; wherein the ordinate S7y _(i) of the crop row sub-image S7 serves as an independent variable,the initial middle ridge center p0M0_(i), the initial left rowhorizontal center column CLM0_(i), the initial right row horizontalcenter column CRM0_(i) serve as dependent variables, respectively,univariate regression models pM, pL and pR are constructed between theinitial middle ridge center p0M0_(i) and the ordinate S7 y _(i) of thecrop row sub-image S7, between the initial left row horizontal centercolumn CLM0_(i) and the ordinate S7 y _(i) of the crop row sub-image S7,and between the initial right row horizontal center column CRM0_(i) andthe ordinate S7 y _(i) of the crop row sub-image S7, respectively. 5.The method for detecting the field navigation line after the ridgesealing of the crops according to claim 1, wherein the step 9)specifically comprising: 9.1) constructing a blank right crop row pointset SCR and a blank left crop row point set SCL; 9.2) taking a k-th rowon the crop row image S6 as a row image S9, wherein an ordinate of therow image S9 as an independent variable is substituted into univariateregression models pM, pL, and pR to obtain a crop middle ridge centercolumn p0M1_(k), a crop left ridge horizontal center column CLM1_(k),and a crop right ridge horizontal center column CRM1_(k) on the currentrow image S9; 9.3) on the current row image S9, adding the coordinatesof a pixel with a pixel value of 1 between the crop middle ridge centercolumn p0M1_(k) and the crop left ridge horizontal center columnCLM1_(k) corresponding to the crop row image S6 to the left crop rowpoint set SCL; 9.4) on the current row image S9, adding the coordinatesof a pixel with a pixel value of 1 between the crop middle ridge centercolumn p0M1_(k) and the crop right ridge horizontal center columnCRM1_(k) corresponding to the crop row image S6 to the right crop rowpoint set SCR; 9.5) repeating step 9.2) to step 9.4), wherein each rowof the crop row image S6 is traversed to obtain the complete left croprow point set SCL and the right crop row point set SCR; 9.6) whereinordinates of the pixels in the left crop row point set SCL serve asindependent variables, abscissas of the pixels in the left crop rowpoint set SCL serve as dependent variables, a univariate regressionmodel for the left crop row point set SCL is constructed, and a leftcrop row centerline model CL is obtained; 9.7) wherein ordinates of thepixels in the right crop row point set SCR serve as independentvariables, abscissas of the pixels in the right crop row point set SCRserve as dependent variables, a univariate regression model for theright crop row point set SCR is constructed, and a right crop rowcenterline model CR is obtained.
 6. The method for detecting the fieldnavigation line after the ridge sealing of the crops according to claim1, wherein the step 10) specifically comprises: 10.1) constructing ablank middle ridge point set Spath; 10.2) taking a q-th row on the croprow image S6 as a row image S10, wherein an ordinate of the line imageS10 as an independent variable is substituted into a left crop rowcenterline model CL and a right crop row centerline model CR to obtain aleft row center point CL1_(q) and a right row center point CR1_(q) onthe current line image S10; 10.3) on the current line image S10, addingthe coordinates of a pixel with a pixel value of 0 between the left rowcenter point CL1_(q) and the right row center point CR1_(q)corresponding to the crop row image S6 into the middle ridge point setSPath; 10.4) repeating step 10.2) to step 10.3), wherein each row imageS10 of the crop row image S6 is traversed to obtain the complete middleridge point set Spath; 10.5) wherein the ordinates of the pixels in themiddle ridge point set SPath serve as independent variables, abscissasof the pixels in the middle ridge point set SPath serve as dependentvariables, a univariate regression model is constructed for the middleridge point set SPath, a middle ridge centerline model pPath isobtained, and the straight line where the middle ridge centerline modelpPath is located is the navigation line for the field machinery.